package com.jt.service.impl;

import com.jt.dao.TeacherMapper;
import com.jt.entity.Teacher;
import com.jt.service.TeacherService;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service

public class TeacherServiceImpl implements TeacherService {

    @Autowired
    private TeacherMapper teacherMapper;

    @Override
    public Integer save(Teacher teacher) {
        return teacherMapper.save(teacher);
    }

    @Override
    public Teacher queryById(Integer id) {
        return teacherMapper.queryById(id);
    }

    @Override
    public List<Teacher> queryAll() {
        return teacherMapper.queryAll();
    }

    @Override
    public List<Teacher> queryPage(RowBounds rowBounds) {
        return teacherMapper.queryPage(rowBounds);
    }

    @Override
    public List<Teacher> queryByIds(Integer[] ids) {
        return teacherMapper.queryByIds(ids);
    }

    @Override
    public List<Teacher> queryByLikeName(String tname) {
        return teacherMapper.queryByLikeName(tname);
    }

    @Override
    public Integer updateStatus(Integer id, Integer status) {
        return teacherMapper.updateStatus(id,status);
    }

    @Override
    public Integer update(Teacher teacher) {
        return teacherMapper.update(teacher);
    }


}
